#ifndef CUSTOMTEXTEDIT_H
#define CUSTOMTEXTEDIT_H

#include <QWidget>
#include <QTextEdit>
#include <QKeyEvent>

namespace Ui {
class CustomTextEdit;
}

class CustomTextEdit : public QTextEdit
{
    Q_OBJECT

public:
    explicit CustomTextEdit(QWidget *parent = nullptr);
    ~CustomTextEdit();

protected:
    void keyPressEvent(QKeyEvent *event) override;

signals:
    // 按下回车发送的信号,绑定发送按钮
    void sendButtonPressed();
private:
    Ui::CustomTextEdit *ui;

};

#endif // CUSTOMTEXTEDIT_H
